/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx.ls.controller;

import cn.webrx.ls.mapper.GoodsImageMapper;
import cn.webrx.ls.mapper.GoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>Project: likeshop - IndexController
 * <p>Powered By webrx
 * <p>Created By IntelliJ IDEA On 2021-03-30 15:07:00
 * <p>Description :
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 15
 */
@Controller
public class IndexController {
    @Autowired
    private GoodsMapper goodsdao;

    @Autowired
    private GoodsImageMapper imgmapper;

    @RequestMapping("/")
    public String index(Model m) {
        m.addAttribute("goods",goodsdao.mys());
        m.addAttribute("imgs",imgmapper.imgs());
        return "index/index";

    }


}
